package kz.kstu.aecdemo.facade.ejb.api;


import kz.kstu.aec.model.AuthenticationData;
import kz.kstu.aec.model.Point2D;
import kz.kstu.aecdemo.business.entity.security.ECAccount;

import javax.ejb.Remote;
import javax.security.auth.login.AccountException;
import javax.security.auth.login.AccountNotFoundException;
import javax.security.auth.login.LoginException;
import java.math.BigInteger;


/**
 * @author Filipp_Stankevich
 *         created: 08.09.11 17:36
 */
@Remote
public interface AccountFacade {

    final static String SERVICE_NAME = "AccountFacadeBean";

    void register(String login, Point2D publicKey) throws AccountException;

    BigInteger getAuthenticationNumber(String login) throws AccountNotFoundException;

    ECAccount login(AuthenticationData authenticationData) throws LoginException;

    void changePassword(String login, Point2D publicKey) throws AccountNotFoundException;

    int getUserCount();

}
